CREATE TABLE [dbo].[CD_Categoria](
	[IdCategoria] [int] IDENTITY(1,1) NOT NULL,
	[Nombre] [varchar](50) NULL,
	[IdCategoriaPadre] [int] NULL,
 CONSTRAINT [PK_CD_Categoria] PRIMARY KEY CLUSTERED 
(
	[IdCategoria] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[CD_Categoria]  WITH CHECK ADD  CONSTRAINT [FK_CD_Categoria_CD_Categoria] FOREIGN KEY([IdCategoriaPadre])
REFERENCES [dbo].[CD_Categoria] ([IdCategoria])
GO

ALTER TABLE [dbo].[CD_Categoria] CHECK CONSTRAINT [FK_CD_Categoria_CD_Categoria]
GO


